#ifndef CPERSON_H
#define CPERSON_H

#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include "CTreeException.h"
#include "CBaseException.h"
//#include "manip.h"

using namespace std;
using namespace exceptions;

struct CManip
{
  int m_type;
  int m_sex;
  CManip(int t, int sex): m_type(t), m_sex(sex)
  {
  }
};



class CPerson
{
   private:
      
      friend  std::istream& operator>>(std::istream& str,CPerson &pers);
      string FirstName;
      string LastName;
      string FaterName;
      int sex;
      int num;
      //int year;
      //int mount;
      //int date;
	  string date;
   
   public:
      CPerson();
      //CPerson(string Fname, string Lname, string FaterN,int sx,int y, int m, int d);
	  CPerson(string Fname, string Lname, string FaterN,int sx,string dateG);
      
      string getFName() const;
      string getLName() const;
	  string getFatName() const;
      int getSex() const;
      //int getNum();
      //int getYear();
      //int getMount();
      //int getDate();
	  string getDateG() const;
      void printPerson();
	  string getAll();
	  void setAll(string Fname, string Lname, string FaterN,string dateG);

};



std::ostream& operator<<(std::ostream& str, const CPerson &pers);

std::istream& operator>>(std::istream& str,CPerson &pers);


bool operator==(const CPerson &pers1,const CPerson &pers2);
bool operator!=(const CPerson &pers1,const CPerson &pers2);

inline CManip manip(int t, int s);

std::ostream& operator<<(std::ostream& str, CManip& m);


#endif

